#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>

void* my_memmove(void* dest, void* src, size_t num)
{
	assert(dest && src);
	void* ret = dest;
	if(dest<src)
		while (num--) {
			*(char*)dest = *(char*)src;
			dest = (char*)dest + 1;
			src = (char*)src + 1;
		}
	else
		while (num--) 
			*((char*)dest + num) = *((char*)src + num);
	return ret;
}
int main()
{
	char arr[20] = "abcdefghigk";
	my_memmove(arr, arr + 3, 5);
	printf("%s", arr);
	return 0;
}